from flask_apscheduler import APScheduler
from flask_marshmallow import Marshmallow
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy


# 默认autocommit = False， 会造成启动事务的query,建议设为True
from app.cache.iron_redis import IronRedis
from app.cache.iron_redis_back import IronRedisBack
from flask_pymongo import PyMongo
from app.database.influxdb import InfluxDB
from app.database.py_mysql import MysqlPool

db = SQLAlchemy(session_options={'autocommit': True})
migrate = Migrate()
ma = Marshmallow()
data_container = {}
scheduler = APScheduler()
# ironman_manager = IronManManager()
ironman_redis = IronRedis()
ironman_redis_back = IronRedisBack()
mongo= PyMongo()
influxdb = InfluxDB()
mysql_pool = MysqlPool()

